//
//  CollectionHeaderView.m
//  YuDou
//
//  Created by qiupeng on 2018/6/24.
//  Copyright © 2018年 yingqi. All rights reserved.
//

#import "CollectionHeaderView.h"
#import "AnchorGroup.h"

@interface CollectionHeaderView()

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
@property (weak, nonatomic) IBOutlet UIButton *moreBtn;
@property (weak, nonatomic) IBOutlet UIButton *arrowBtn;

@end

@implementation CollectionHeaderView

+ (instancetype)collectionHeaderView
{
    return [[[NSBundle mainBundle] loadNibNamed:@"CollectionHeaderView" owner:nil options:nil] firstObject];
}

- (void)setGroup:(AnchorGroup *)group
{
    _group = group;
    
    self.titleLabel.text = group.tag_name;
    if (group.icon_name) {
        self.iconImageView.image = [UIImage imageNamed:group.icon_name];
    }else{
        self.iconImageView.image = [UIImage imageNamed:@"home_header_normal"];
    }
}

@end
